<include file="Public:header" /> 
<div style="clear:both"></div>
<style>
body{font-family:"微软雅黑"}
a{text-decoration:none;}
a:hover{color:#005aa0;text-decoration: none;}
.cont-box{width:1200px;margin:0 auto;}
.left{width:210px;float:left;border:1px solid #dedede;margin-top:15px;z-index:0;}
.right{width:970px;float:right;margin-top:15px;}
.goods_list{width:980px;margin:0 auto;float:right}
.goods_ad{width:970px;float:right;border:1px solid #dedede;}
.goods_ck{width:970px;float:right;border:1px solid #dedede;margin-top:10px;}
.ck_title{height:20px;background-color:#f7f7f7;margin-top:0px;font:15px bold;padding:5px;}
.kuozhan{padding:5px;}
.kz-name{font-weight:bold;width:60px;display:block;float:left;text-align:right}
.kz-value{color:#005aa0;margin-left:10px;}
.kz-value:hover{color:#fff;background-color:#005aa0}

.goods{width:220px;height:290px;margin-left:15px;margin-top:5px;float:left;}
.goods_pic{position:relative;z-index:1;width:205px;height:205px;margin:0 auto;margin-top:5px;}
.goods_pic:hover{border:2px solid #317ee7;margin-top:4px;}
.goods_title{width:200px;height:200px;margin:0 auto;text-align:left;margin-top:5px;height:40px;overflow:hidden;}
.goods_price{width:200px;margin:0 auto;text-align:left;margin-top:5px;height:30px;overflow:hidden;color:#CC0000;font-weight:bold;font-size:15px;}

/*商品筛选*/
#filter{width:960px;height:auto;margin-left:auto;margin-right:auto;font-size:12px;}
#filter dl{padding:0;margin-top:0;margin-bottom:0;clear:both;padding:4px 0;}
#filter dt,dd{display:block;float:left;width:auto;padding:0;margin:3px 0;}
#filter dt{height:14px;width:60px;text-align:right;margin-right:10px;padding-bottom:4px;font-weight:bold;color:#333333;}
#filter dd{color:#005AA0;margin-right:8px;}
#filter a{cursor:pointer;}
.seling{background-color:#005AA0;color:#FFFFFF;}
.seled{background-color:#005AA0;color:#FFFFFF;}
#filter a:hover{color:#fff}
/*商品筛选end*/
/*商品分页*/
.list-page{width:960px;float:right;text-align:right;margin-right:20px;margin-top:10px;}
.page2{height:30px;width:30px;border:1px solid #FF5500; text-align:center;line-height:30px;display:inline-block;color:#0066CC;cursor:pointer;}
.page2:hover{color:#0066CC}
.current{height:30px;width:30px;border:1px solid #FF5500; text-align:center;line-height:30px;color:#FF0000;font-weight:bold;background:#FFEEE5;display:inline-block;cursor:pointer;}
.fan{height:30px;width:50px;border:1px solid #FF5500; text-align:center;line-height:30px;color:#FF0000;background:#FFEEE5;display:inline-block;cursor:pointer;}
.total{font-size:14px;}

.shaixuan{padding:3px;float:left;width:40px;margin-top:5px;height:20px;line-height:20px;margin-left:10px;text-align:center;}
#price{text-align:left;color:#E4393C;font-size:14px;font-family:'微软雅黑';font-weight:bold;}
/*商品推荐*/
.goods_ad ul{float:left;width:170px;margin-left:20px;}
.goods_ad ul img{width:160px;max-height:160px}
</style>

<input id="cat" type="text" value="{$cat_now.cat_id}" style="display:none">
<div class="cont-box">
    <div class="left">
<volist name="leftad" id="leftad"><div style="padding-bottom:10px">{$leftad.content}</div></volist>
	</div>

	<div class="right">
	        <div class="goods_ad">
			    <div style="padding:10px;font-size:14px;background:#f7f7f7;border-bottom:1px solid #dddddd">精品推荐</div>
				<div>
<volist name="goods_rec" id="goods_rec">
            	<ul>
				    <li><a href="__APP__/item/{$goods_rec.goods_id}.html"><img alt="{$goods_rec.goods_name}" src="__APP__/{$goods_rec.m_pic}"></a></li>
					<li style="max-height:38px;overflow:hidden"><a href="__APP__/item/{$goods_rec.goods_id}.html">{$goods_rec.goods_name}</a></li>
					<li id="price" style="margin-left:0px">￥{$goods_rec.price}</li>
                </ul>
</volist>
               </div>
			</div>

	        <div class="goods_ck">
			   <ul class="ck_title"><font color="#CC0000">{$cat_now.cat_name}</font>-商品筛选<dt style="float:right;margin-right:20px;color:#CC0000;font-size:15px;">共{$num}件商品</dt></ul>
			    <div style="clear:both"></div>
			   <ul id="filter">
<volist name="model" id="model">
   <if condition="$model.leixing eq 'b'">
			   <dl>
					<dt>{$model.value_name}:</dt>
					<dd><div><a>全部</a></div></dd>
			<volist name="model[value]" id="value">
					<dd><div><a>{$value}</a></div></dd>
			</volist>           
				</dl>		
   </if>
</volist>
               </ul>
			    <div style="clear:both"></div>
			</div>
<!--
			<div class="goods_ck" style="background-color:#f7f7f7;height:35px;line-height:30px;">
			    <dt class="shaixuan">价格↑</dt>
				<dt class="shaixuan">销量</dt>
				<dt class="shaixuan">人气</dt>
                <dt style="float:right;margin-right:20px;color:#CC0000;font-size:15px;">共{$num}件商品</dt>
           </div>
-->
			<div class="goods_list" id="goods_list">
			<include file="ajaxlist" />
			</div>

	</div>
</div>

<div style="clear:both"></div>


<script type="text/javascript">
    $(function () {
        //选中filter下的所有a标签，为其添加hover方法，该方法有两个参数，分别是鼠标移上和移开所执行的函数。
        $("#filter a").hover(
            function () {
                $(this).addClass("seling");
            },
            function () {
                $(this).removeClass("seling");
            }
        );

        //选中filter下所有的dt标签，并且为dt标签后面的第一个dd标签下的a标签添加样式seled。(感叹jquery的强大)
        $("#filter dt+dd a").attr("class", "seled");     

        //为filter下的所有a标签添加单击事件
        $("#filter a").click(function () {
            $(this).parents("dl").children("dd").each(function () {
				$('a',this).removeClass("seled");
            });

            $(this).attr("class", "seled");

            getlist(); //返回选中结果   弹出
        });
        //alert(RetSelecteds()); //返回选中结果   弹出
    });

    function RetSelecteds() {
        var result = "";
        $("#filter a[class='seled']").each(function () {
            result += "-"+$(this).html();
        });
        return result;
    }
	function getlist(){
	var cat=$('#cat').val();
	var nn=RetSelecteds();
	   $.ajax({
	       type:'GET',
		   url:'__URL__',
		   dataType:'html',
		   data:{check:nn,cid:cat},
		   success:function(data){
		   $("#goods_list").html(data);
		   }
	   })
	}
</script>
<include file="Public:footer" /> 